package com.vcredit.creditcat.service.product;

import java.util.Map;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.vcredit.creditcat.enumtype.AuthItemEnum;
import com.vcredit.creditcat.enumtype.MerchantProductEnum;
import com.vcredit.creditcat.exception.ProductCanNotApplyException;
import com.vcredit.creditcat.exception.ResourceException;
import com.vcredit.creditcat.model.Cust;
import com.vcredit.creditcat.model.CustProductApply;
import com.vcredit.creditcat.model.ProductItem;
import com.vcredit.creditcat.service.CustProductApplyService;
import com.vcredit.framework.annotation.Log;

/**
 * @author xiaojingjing
 */
@Service("creditFlower")
public class CreditFlowerApplyService implements IProductApplyService {
  @Autowired
  private CustProductApplyService custProductApplyService;
  @Autowired
  @Qualifier("productStrategyContext")
  private ICreditCommonService creditCommonApplyService;


  @Log
  @Valid
  @Override
  public Object applyCommit(Long custId, Long productId,Map<String,String> otherParams) throws Exception {
    return null;
  }

  @Log
  @Override
  public void queryLimit(CustProductApply custProductApply) throws Exception {

    CustProductApply creditAmoutResult =
        creditCommonApplyService.getCreditAmoutResult(custProductApply,
            MerchantProductEnum.creditFlower);
    if (null == creditAmoutResult) {
      return;
    }
    creditCommonApplyService.saveCustProductApply(creditAmoutResult);

  }



  /** 
   * TODO 简单描述该方法的实现功能（可选）. 
   * @see com.vcredit.creditcat.service.product.IProductApplyService#hasAlreadyAuditAmount(com.vcredit.bird.vo.product.ProductOutputDto) 
   */
  @Override
  public Boolean hasAlreadyAuditAmount(Object resultDto) throws ProductCanNotApplyException {
    return null;
  }


  /** 
   * TODO 简单描述该方法的实现功能（可选）. 
   * @see com.vcredit.creditcat.service.product.IProductApplyService#getCreditAmountParam() 
   */
  @Override
  public Object getCreditAmountParam(Cust cust, ProductItem productItem) {
    return null;
  }

  /** 
   * TODO 简单描述该方法的实现功能（可选）. 
   * @see com.vcredit.creditcat.service.product.IProductApplyService#getAudInputParam() 
   */
  @Override
  public Object getAudInputParam(Object dto) {
    return null;
  }

  /** 
   * TODO 简单描述该方法的实现功能（可选）. 
   * @see com.vcredit.creditcat.service.product.IProductApplyService#getSaveAuditResultParam(com.vcredit.bird.vo.product.ProductOutputDto) 
   */
  @Override
  public CustProductApply getSaveAuditResultParam(Long custId, Long productId, Object outputDto)
      throws Exception {
    return null;
  }

  /** 
   * TODO 简单描述该方法的实现功能（可选）. 
   * @see com.vcredit.creditcat.service.product.IProductApplyService#getProductCommitParam(java.util.Map) 
   */
  @Override
  public Object getProductCommitParam(Long productId, Cust cust, Map<AuthItemEnum, Object> itemMap,Map<String,String> otherParams)
      throws ResourceException, Exception {
    return null;
  }

  /** 
   * TODO 简单描述该方法的实现功能（可选）. 
   * @see com.vcredit.creditcat.service.product.IProductApplyService#getProductCheckCreditParam(com.vcredit.creditcat.model.Cust) 
   */
  @Override
  public Object getProductCheckCreditParam(Cust cust) {
    return null;
  }

  /** 
   * TODO 简单描述该方法的实现功能（可选）. 
   * @see com.vcredit.creditcat.service.product.IProductApplyService#checkCreditResult(java.lang.Object) 
   */
  @Override
  public Object checkCreditResult(Long custId, Long productId, Object commitOutput) {
    return null;
  }

}
